package Job03.Circle;

import Job03.Shapes.Shapes;

public class Circle  extends Shapes {
    private double r;

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public Circle(double r) {
        this.r = r;
    }

    public Circle() {
    }

    @Override
    public void Shapes() {
        System.out.println("圆周长和面积");
    }

    @Override
    public void area() {//面积
        System.out.println("面积:" +(this.getR() * this.getR() * Math.PI));
    }

    @Override
    public void c() {
        System.out.println("周长:" +(Math.PI*r*2));
    }
}
